<template>
  <div class="errPage">
    <el-row>
      <el-col :span="24">
        <div>
          <title-com>
            <div>
              报错列表
              <i class="el-icon-refresh pointer font-des"></i>
            </div>
          </title-com>
        </div>
        <el-space class="m-t-20">
          <span>选择时间</span>
          <el-select value="">
            <el-option value="">近三天</el-option>
          </el-select>
          <span>状态</span>
          <el-select value="">
            <el-option value="">未查看</el-option>
          </el-select>
        </el-space>
        <div class="m-t-20">
          <el-table :data="tableData" style="width: 100%">
            <el-table-column fixed prop="date" label="企业名称">
            </el-table-column>
            <el-table-column prop="name" label="任务名称"> </el-table-column>
            <el-table-column prop="city" label="报错时间"> </el-table-column>
            <el-table-column prop="address" label="报错详情" width="300">
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="120">
              <template #default="scope">
                <el-button @click="open(scope.row)" type="text" size="small">
                  {{ type }}
                </el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <div class="ta-right m-t-20">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[5, 10, 15, 20]"
            :page-size="100"
            layout="total, sizes, prev, pager, next, jumper"
            :total="50"
          >
          </el-pagination>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  // components: {
  //   Select,
  // },
  methods: {
    handleSizeChange(val: number) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val: number) {
      console.log(`当前页: ${val}`);
    },
    Collect(row: number) {
      // console.log(row);
      // this.collect = false;
    },
    CancelCollect(row: number) {
      // console.log(row);
      // this.collect = true;
    },
    deleteRow(row: number) {
      console.log(row);
    },
    open(row: number) {
      // console.log(11111, row);
      // this.dialogVisible=true
      // this.row=row;
    },
    close(val: number) {
      // this.dialogVisible=val
    },
  },
  data() {
    return {
      dialogVisible: false,
      row: [],
      currentPage4: 4,
      options1: [
        {
          value: "近三天",
          label: "近三天",
        },
        {
          value: "近五天",
          label: "近五天",
        },
        {
          value: "近一周",
          label: "近一周",
        },
      ],
      options2: [
        {
          value: "未查看",
          label: "未查看",
        },
        {
          value: "正在处理",
          label: "正在处理",
        },
        { value: "已解决", label: "已解决" },
        {
          value: "未找到原因",
          label: "未找到原因",
        },
      ],
      type: "未查看",
      value1: "",
      value2: "",
      tableData: [
        {
          date: "2016-05-03",
          name: "王小虎",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-02",
          name: "王小虎",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-08",
          name: "王小虎",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-06",
          name: "王小虎",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-07",
          name: "王小虎",
          city: "普陀区",
          address: "上海市普陀区金沙江路 1518 弄",
        },
      ],
    };
  },
});
</script>

<style lang="scss" scoped>
.errPage {
  background: #fff;
  height: 100%;
  padding: 20px;
}
</style>
